﻿Option Explicit On
Option Strict On
Namespace PL
    ''' <summary>
    ''' Use to accumulate all the validation error and centralize common validation operation
    ''' </summary>
    Public NotInheritable Class PLValidation

        Public Name As String
        Public Messages As DataTable

        Public HasError As Boolean = False
        Public HasWarning As Boolean = False


        Public Sub New()
            Me.Messages = New DataTable()
        End Sub

        Public Sub New(ByVal name As String)
            Me.New()
            Me.Name = name
            Me.Messages.TableName = name
        End Sub

        ''TODO:
        ' Pas toute suite a revoir dans x temp avec Bernard 2014 :)  
        'Public Function LengthIsValid() As Boolean
        '    Throw New NotImplementedException("LengthIsValid not implemented, Confirm with Bernard - aleblanc 2011-09-01")
        '    Return False
        'End Function

        ''TODO:
        'Public Function FieldIsEmpty() As Boolean
        '    Throw New NotImplementedException("FieldIsEmpty not implemented, Confirm with Bernard - aleblanc 2011-09-01")
        '    Return False
        'End Function

        ''TODO:
        'Public Function EmailIsValid() As Boolean
        '    Throw New NotImplementedException("EmailIsValid not implemented, Confirm with Bernard - aleblanc 2011-09-01")
        '    Return False
        'End Function

        ''TODO:
        'Public Function RegExIsValid() As Boolean
        '    Throw New NotImplementedException("RegExIsValid not implemented, Confirm with Bernard - aleblanc 2011-09-01")
        '    Return False
        'End Function

        ''TODO:
        'Public Function InBetweenRangeInclusive() As Boolean
        '    Throw New NotImplementedException("InBetweenRangeInclusive not implemented, Confirm with Bernard - aleblanc 2011-09-01")
        '    Return False
        'End Function

        ''TODO:
        'Public Function InBetweenRangeExclusive() As Boolean
        '    Throw New NotImplementedException("InBetweenRangeExclusive not implemented, Confirm with Bernard - aleblanc 2011-09-01")
        '    Return False
        'End Function

        ''TODO:
        'Public Function GreaterThan(ByVal source As Object, ByVal target As Object, ByVal msgCode As String, ByVal row As DataRow, Optional ByVal msg As String = Nothing) As Boolean
        '    Throw New NotImplementedException("GreaterThan not implemented, Confirm with Bernard - aleblanc 2011-09-01")
        '    Return False
        'End Function

        ''TODO:
        'Public Function GreaterThanEqual() As Boolean
        '    Throw New NotImplementedException("GreaterThanEqual not implemented, Confirm with Bernard - aleblanc 2011-09-01")
        '    Return False
        'End Function

        ''TODO:
        'Public Function LessThan() As Boolean
        '    Throw New NotImplementedException("LessThan not implemented, Confirm with Bernard - aleblanc 2011-09-01")
        '    Return False
        'End Function

        ''TODO:
        'Public Function LessThanEqual() As Boolean
        '    Throw New NotImplementedException("LessThanEqual not implemented, Confirm with Bernard - aleblanc 2011-09-01")
        '    Return False
        'End Function

        ''TODO:
        'Public Function Equal() As Boolean
        '    Throw New NotImplementedException("Equal not implemented, Confirm with Bernard - aleblanc 2011-09-01")
        '    Return False
        'End Function

        ''TODO:
        'Public Function NotEqual() As Boolean
        '    Throw New NotImplementedException("NotEqual not implemented, Confirm with Bernard - aleblanc 2011-09-01")
        '    Return False
        'End Function
    End Class
End Namespace
